﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace Xfm
{
    public class StringLengthCnAttribute : StringLengthAttribute
    {
        public StringLengthCnAttribute(int maximumLengt) : base(maximumLengt)
        {

        }
        public override string FormatErrorMessage(string name)
        {
            if (string.IsNullOrEmpty(ErrorMessage))
                ErrorMessage = "'{0}'的长度必须在{2}-{1}之间";
            return base.FormatErrorMessage(name);
        }
    }
}
